package com.wfh.aigenerator.model.enums;

import lombok.Getter;

/**
 * @Title: CodeGenTypeEnums
 * @Author wangfenghuan
 * @Package com.wfh.aigenerator.model.enums
 * @Date 2025/7/29 20:43
 * @description:
 */
@Getter
public enum CodeGenTypeEnums {

    HTML("原生html", "html"),
    MULTI_FILE("原生多文件模式", "multi_file"),
    VUE("vue项目", "vue");

    private final String text;
    private final String value;

    CodeGenTypeEnums(String text, String value) {
        this.text = text;
        this.value = value;
    }

    public static CodeGenTypeEnums getByValue(String value) {
        for (CodeGenTypeEnums codeGenTypeEnums : CodeGenTypeEnums.values()) {
            if (codeGenTypeEnums.getValue().equals(value)) {
                return codeGenTypeEnums;
            }
        }
        return null;
    }
}
